﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.IO;

namespace suanpan.API.Components.OAuth
{
    public class OAuthToken
    {

        //private void EncryptToken(string consumerKey, string consumerSecret, int oauthUser)
        //{
        //    string unencryptedToken = string.Format("{0}|{1}|{2}", consumerKey, oauthUser.ToString(), _granted.ToString());

        //    using ( MemoryStream ms = new MemoryStream(ASCIIEncoding.ASCII.GetBytes(unencryptedToken)) )
        //    {
        //        SymmetricAlgorithm algoritm = new RijndaelManaged();
        //        ICryptoTransform transform = algoritm.CreateEncryptor();
        //        CryptoStream cryptStream = new CryptoStream(ms, transform, CryptoStreamMode.Write);
        //    }

        //}

        private string _consumerKey;
        public string ConsumerKey
        {
            get { return _consumerKey; }
            set { _consumerKey = value; }
        }

        private int _oauthUser;
        public int OAuthUser
        {
            get { return _oauthUser; }
            set { _oauthUser = value; }
        }

        private DateTime _granted;
        public DateTime Granted
        {
            get { return _granted; }
            set { _granted = value; }
        }
    }
}
